<!DOCTYPE html>
<html class="um landscape min-width-240px min-width-320px min-width-480px min-width-768px min-width-1024px">
    <head>
        <title></title>
        <meta charset="utf-8">
        <meta name="viewport" content="target-densitydpi=device-dpi, width=device-width, initial-scale=1, user-scalable=no, minimum-scale=1.0, maximum-scale=1.0">
        <link href="skin/base.css" type="text/css" rel="stylesheet" />
        <link href="skin/form.css" type="text/css" rel="stylesheet" />
        <link href="skin/btn.css" type="text/css" rel="stylesheet" />
        <script src="js/zy_control.js"></script>
        <script src="js/zy_click.js"></script>
		<script src="js/zy_json.js"></script>
		<script src="js/login.js"></script>
		<script src="js/config.js"></script>
		<script src="js/common.js"></script>
        
    </head>
    <body ontouchstart>
        <div id="main">
			<div id="content">
              <div class="form">
				<section>
					<menu>
                    	<strong>UID:</strong>
						<label><span id="uid">加载中...</span></label>
					</menu>
					<menu>
						<strong>昵称:</strong>
						<label><span id="name">加载中...</span></label>
					</menu>
					<menu>
						<strong>性别:</strong>
						<label><span id="gender">加载中...</span></label>
					</menu>
					<menu>
						<strong>地址:</strong>
						<label><span id="site"></span></label>
					</menu>
					<menu>
						<strong>开发平台:</strong>
						<label><span id="platforms">加载中...</span></label>
					</menu>		
					<menu>
						<strong>专长领域:</strong>
						<label><span id="expertise">加载中...</span></label>
					</menu>
					<menu>
						<strong>加入时间:</strong>
						<label><span id="joinTime">加载中...</span></label>
					</menu>	
				</section>
				
				
				</div>
			
			</div>
		</div>
    </body>
    <script>
    	zy_init();
		var Users= new Users({})
		
		function GetUrl(){
			if (Users.checkUser()) {
				uexWindow.toast(1, 5, '加载中...', 0);
				var url = OpenAPI.my_information+'/?client_id='+OpenAPI.client_id+'&access_token='+localStorage['access_token'];
				uexXmlHttpMgr.open(1,'post',url,"8000");
				uexXmlHttpMgr.send('1');
				//logs(url);
			}else{
				Users.logout();
				localStorage['login']='user_info';
				uexWindow.open('login', '0', 'login.html', 12, '', '', 0x0);
			}

		}
		
        window.uexOnload = function(type){
            if (!type){
				uexWindow.setBounce("1");
				uexXmlHttpMgr.onData = function(opId, status, data){
					data=JSON.parse(data);			
					if (opId == 1) {
						uexWindow.closeToast();
						if(data['user']){
							$$('uid').innerHTML=data['user'];
							$$('name').innerHTML=data['name'];
							$$('gender').innerHTML=data['gender']==1 ? '男' : '女';
							$$('site').innerHTML=data['province']+' '+data['city'];
							$$('platforms').innerHTML=data['platforms'];
							$$('expertise').innerHTML=data['expertise'];
							$$('joinTime').innerHTML=data['joinTime'];
						}else{
							uexWindow.toast("0", "5", '请求个人资料失败', 1000);
						}
					}
				}
				GetUrl();
			}
        }
    </script>
</html>